using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.OleDb;
using prDe_Tai.DuLieu;
namespace prDe_Tai.QuanLy
{
    class KiemTraDuLieu
    {
        LayToanBoDuLieu laytoanbodulieudekiemtra = new LayToanBoDuLieu();
        public void kiemtradulieukhithemvaobang_DanhSachPhanMem(string tenphanmem, string chucnang, string diachidownload, string loaiphanmem, string chude)
        {
            int sothutu;
            
            DataSet ds = laytoanbodulieudekiemtra.laytoanbodulieutrongbang_DanhSachPhanMem();
            sothutu = ds.Tables[0].Rows.Count + 1;
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                if (tenphanmem != dr["tenphanmem"].ToString())
                {
                    ThemDuLieu themphanmem = new ThemDuLieu();
                    themphanmem.themdulieuvaobang_DanhSachPhanMem(sothutu,tenphanmem,chucnang,diachidownload,loaiphanmem,chude);
                    break;
                }
            }
        }
        public void kiemtradulieukhithemvaobang_DanhSachBoSuuTap(string tenphanmem,string chude, string chucnang, string loaiphanmem, string diachidownload)
        {
            int sothutu;
            DataSet ds = laytoanbodulieudekiemtra.laytoanbodulieutrongbang_DanhSachBoSuuTap();
            sothutu = ds.Tables["DanhSachBoSuuTap"].Rows.Count + 1;
           // foreach (DataRow dr in ds.Tables["DanhSachBoSuuTap"].Rows)
            //{
                //if (tenphanmem != dr["tenphanmem"].ToString())
                //{
                    ThemDuLieu themphanmem = new ThemDuLieu();
                    themphanmem.themdulieuvaobang_DanhSachBoSuuTap(sothutu,tenphanmem,chude,chucnang,loaiphanmem,diachidownload);
                    //break;
                //}
           // }
        }
    }
}
